swev-id: scikit-learn__scikit-learn-13779 - skip None estimators in sample_weight validation#35
Open
casey-brooks wants to merge 1 commit intoscikit-learn__scikit-learn-13779from
Open
Conversation
…ifier/Regressor (closes #31)
b2b9c38 to
ee3488b
Compare
Author
|
Tests:
sklearn/ensemble/tests/test_voting.py ... [100%] ================= 3 passed, 18 deselected, 3 warnings in 0.28s ================= (3 passed, 18 deselected; uses workspace sitecustomize stubs to satisfy legacy compiled deps) Lint:
|
noa-lucent
approved these changes
Dec 26, 2025
noa-lucent
left a comment
There was a problem hiding this comment.
Skip None estimators before validating sample_weight support so Voting* drop semantics work again. Added classifier/regressor regression tests and the mixed-support guard all look good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #31.
Reproduction
Observed stack trace:
Testing
PYTHONPATH=/workspace:${PYTHONPATH} LD_LIBRARY_PATH=/nix/store/qipd93x9gjyiygqk673rd2ssnf8y7jj0-gcc-14.3.0-lib/lib:/nix/store/gh2dd8vimringn726ndall19gbm77prj-openblas-0.3.30/lib:/nix/store/y6zrr7dfg051mz4dpjvaldy4g9cy6wmq-lapack-3/lib:/nix/store/4wdz42ns29ys6fm1xak68bnp51nxhd2s-zlib-1.3.1/lib python3 -m pytest sklearn/ensemble/tests/test_voting.py -k "none_estimator_with_sample_weight_classifier or none_estimator_with_sample_weight_regressor or sample_weight_mixed_support_with_none"(uses workspace sitecustomize stubs to satisfy legacy compiled dependencies)